#!/bin/bash

path="$1"

work_list=$(ps -ef|grep $path/shaozi-notification-center.jar|grep shaozi-notification-center |grep -v grep |awk '{print $2}')
if [[ "$work_list" == "" ]];then
exit
fi

#kill -9 pid
ps -ef|grep $path/shaozi-notification-center.jar |grep shaozi-notification-center| grep -v grep |awk '{print $2}'|xargs kill -9

#success msg
echo "shutdown success:"$path/shaozi-notification-center.jar

ps -ef|grep $path/shaozi-notification-center.jar |grep shaozi-notification-center| grep -v grep |awk '{print $2}'